package com.prs.crm.action;

import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.ServletActionContext;
import org.courser.struts.BaseAction;
import org.w3c.dom.Document;

import com.prs.crm.util.GanttExport;

public abstract class XMLExportAction extends BaseAction{

	private static final long serialVersionUID = 1L;
	
	private Document document;
	
	private GanttExport ganttExportUtil;
	
	public void setDocument(Document document) {
		this.document = document;
	}

	public Document getDocument() {
		return document;
	}
	
	public void setGanttExportUtil(GanttExport ganttExportUtil) {
		this.ganttExportUtil = ganttExportUtil;
	}

	public GanttExport getGanttExportUtil() {
		return ganttExportUtil;
	}
	
	public void prepareExport()
	{
		HttpServletResponse response = ServletActionContext.getResponse();

	    response.setContentType("text/xml;charset=UTF-8");

	    response.setHeader("Cache-Control", "no-cache");
	}
}
